<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<h2
	style="font-size: 30px; font-weight: bold; padding-left: 270px; padding-top: 20px">Promotion</h2>
<div class="form" style="border: dotted 1px">
	<s:form action="promotionlist" method="post" cssClass="niceform"
		theme="simple" enctype="multipart/form-data">
		<div
			style="padding-left: 200px; color: #f00; font-size: 15px; font-weight: bold;">${requestScope["errorregister"]}</div>
		<fieldset>
			<dl>
				<dt>
					<label for="email">Name:</label>
				</dt>
				<dd>
					<s:if
						test="%{#request.curPromotion != null && #request.curPromotion.getName() != null}">
						<s:textfield type="text" name="offer.name" id="" size="54"
							value="%{#request.curPromotion.getName()}" />
					</s:if>
					<s:else>
						<s:textfield type="text" name="offer.name" id="" size="54"
							value="" />
					</s:else>
				</dd>
			</dl>
			<dl>
				<dt>
					<label for="upload">Upload a image:</label>
				</dt>
				<dd>
					<s:file theme="simple" name="imagePromotion" />
				</dd>
			</dl>
			<dl>
				<dt>
					<label for="upload">Upload a banner:</label>
				</dt>
				<dd>
					<s:file theme="simple" name="imageBanner" />
				</dd>
			</dl>
			<dl>
				<dt>
					<label for="description">Description: </label>
				</dt>
				<dd>
					<s:if
						test="%{#request.curPromotion != null && #request.curPromotion.getDescription() != null}">
						<s:textfield type="text" name="offer.description" id="" size="54"  value="%{#request.curPromotion.getDescription()}" />
					</s:if>
					<s:else>
						<s:textfield type="text" name="offer.description" id="" size="54"
							value="" />
					</s:else>
				</dd>
			</dl>
			<dl>
				<dt>
					<label for="interests">Active:</label>
				</dt>
				<dd>
					<s:if test="%{#request.curPromotion.isEnable() == true}">
						<s:checkbox name="active" checked="checked" />
					</s:if>
					<s:else>
						<s:checkbox name="active" />
					</s:else>
				</dd>
			</dl>
			<dl>
				<dt>
					<label></label>
				</dt>
			</dl>
			<s:submit key="" cssClass="button" name="btnsubmit" type="submit"
				value="SubmitNew"></s:submit>

		</fieldset>
	</s:form>
</div>